<template>
  <div>
    <div class="table">
      <el-table :data="tableData" row-key="id" border :tree-props="{children: 'child'}" size="small">
        <el-table-column align="center" prop="name" label="区域"> </el-table-column>
        <el-table-column align="center" prop="school_number" label="测评学校"> </el-table-column>
        <el-table-column align="center" prop="student_number" label="学生人数"> </el-table-column>
        <el-table-column align="center" prop="student_number" label="已测人数"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import {GETEVALUATIONLIST} from '@/common/api.js'
export default {
  props: ['form'],
  data () {
    return {
      tableData: []
    }
  },
  created () {
    this.tableList()
  },
  methods: {
    tableList () {
      GETEVALUATIONLIST(this.form).then((res) => {
        if (res.data !== null) {
          if (res.data) {
            this.tableData = res.data
          }
        } else {
          this.tableData = []
        }
      }).catch((err) => {
        this.$message.error(err.msg)
      })
    }
  }
}
</script>
